package com.quanyan.place.service;

import com.quanyan.api.APIResponse;
import com.quanyan.common.Plugin.PageObj;
import com.quanyan.place.entity.apireq.*;
import com.quanyan.place.entity.apiresp.*;
import com.quanyan.place.request.ReqCommentAdd;
import com.quanyan.place.response.RespPlaceElementsInfo;

import java.util.List;
import java.util.Map;

/**
 * Created by jingliu on 16/5/26.
 */
public interface ApiPlaceService {
    /**
     * 搜索服务
     * @param reqSearchVo
     * @return
     */
    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> searchPlaceList(ReqSearchVo reqSearchVo);

    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> searchPlaceList(Integer uid, ReqSearchVo reqSearchVo);

    APIResponse<List<RespPlaceElementsInfo>> commentType(Integer placeId);

    APIResponse<Integer> comment(ReqCommentAdd reqCommentAdd);

    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> collectList(Integer uid, double currlng, double currlat, Integer pageNum, Integer pageSize);

    APIResponse<Integer> collect(Integer uid, Integer placeId, Integer type);

    //APIResponse<TbCity> getCity(Double lng, Double lat);

    APIResponse<RespSearchElements> searchElements(Integer clientType, Integer type);

    APIResponse<RespBizPlaceBaseInfo> placeBaseInfo(Integer placeId);

    RespBizPlaceBaseInfo placeBaseInfoUtils(Integer placeId);

    APIResponse<RespPlaceUnitSalePlanDetail> placeSalePlan(ReqPlaceSalePlan reqPlaceSalePlan);

    APIResponse<RespPlaceUnitSalePlanDetail> placeCombineSalePlan(ReqPlaceSalePlan reqPlaceSalePlan);

    APIResponse<RespBizPlaceDetailInfo> placeDetailInfo(ReqPlaceDetailInfo reqPlaceDetailInfo);

    APIResponse<List<RespPlaceCommentInfo>> commentList(ReqCommentList reqCommentList);

    APIResponse<?> getRespPlaceUnitSalePlanDetail(ReqPlaceSalePlan reqPlaceSalePlan);

    boolean updateTbBizPlaceUnitSalePlan(List<String> placeUnitIds, Byte state,String lockRemarks,String uid);

    APIResponse<?> placeBilling(ReqBillingInfo reqBillingInfo) throws Exception;

    APIResponse<?> placeBillingPlus(ReqBillingInfo reqBillingInfo) throws Exception;
    
    APIResponse<?> placeBookAll(ReqBillingInfo reqBillingInfo) throws Exception;
    
    APIResponse<?> placeBlockBook(ReqBillingInfo reqBillingInfo) throws Exception;

    APIResponse<?> placeBook(ReqBillingInfo reqBillingInfo);

    APIResponse<?> placeBookPlus(ReqBillingInfo reqBillingInfo) throws Exception;

    APIResponse<?> placeCancelBook(String reqPlaceOrderId);
    
    APIResponse<?> placeBlockCancelBook(String reqPlaceOrderId);


    APIResponse<?> placePay(String reqPlaceOrderId,Integer adminPayType,
                            String receivedAmount,String memo,
                            String expression,String scanCode) throws Exception;
    
    APIResponse<?> placeBlockPay(String reqPlaceOrderId,Integer adminPayType,
            String receivedAmount,String memo,
            String expression,String scanCode) throws Exception;

    APIResponse<PageObj<List<RespUserBizPlaceOrderInfo>>> userPlaceOrder(Map map);

    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> searchH5PlaceList(ReqSearchVo reqSearchVo);

    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> searchByDb(ReqSearchVo reqSearchVo);

    /**
     * 是否评价过场馆
     * @param uid
     * @param placeId
     * @return
     */
    boolean isComment(Integer uid, Integer placeId);

    /**
     * 是否收藏过场馆
     * @param uid
     * @param placeId
     * @return
     */
    boolean isCollect(Integer uid, Integer placeId);

    /**
     * 批量取消收藏场馆
     * @param uid
     * @param ids
     * @return
     */
    APIResponse<Integer> cancelPlaces(Integer uid, List<Integer> ids);


    APIResponse<RespActivityOrMatchDetail> activityOrMatchDetail(ReqActivityOrMatchDetail reqActivityOrMatchDetail);


    PageObj<List<RespActivityOrMatchList>> activityOrMatchList(ReqActivityOrMatchList reqActivityOrMatchList);

    APIResponse<RespShareUrl> shareUrl(ReqShareUrl reqShareUrl);

    /**
     * 会员开单
     * @param reqBillingInfo
     * @return
     */
    APIResponse<?> placeBillingForMember(ReqBillingInfo reqBillingInfo) throws Exception;

    /**
     * 会员开单 增强 by yxj
     * @param reqBillingInfo
     * @return
     */
    APIResponse<?> placeBillingForMemberPlus(ReqBillingInfo reqBillingInfo) throws Exception;

    /**
     * 会员开单预订
     * @param reqBillingInfo
     * @return
     */
    APIResponse<?> placeBookForMember(ReqBillingInfo reqBillingInfo) throws Exception;

    /**
     * 会员开单预订 增强 by yxj
     * @param reqBillingInfo
     * @return
     */
    APIResponse<?> placeBookForMemberPlus(ReqBillingInfo reqBillingInfo) throws Exception;
    /**
     * 开单会员获取会员卡列表
     * @param userName
     * @param phone
     * @param placeId
     * @param categoryId
     * @return
     */
    APIResponse<List<RespMemberCard>> billingPlaceGetMemberCardList(String userName, String phone, Integer placeId, Integer categoryId);

    /**
     * 会员包场
     * @param reqBillingInfo
     * @return
     */
    APIResponse<?> placeBookAllForMember(ReqBillingInfo reqBillingInfo) throws Exception;

    /**
     * 增加ReqHibirdLog
     * @param reqHibirdLog
     * @return
     */
    APIResponse<?> addHibirdLog(ReqHibirdLog reqHibirdLog);

    /**
     * 商家端支付方式
     * @return Map
     */
    APIResponse<?> getAdminPayWaysDictDisplayName(Integer placeId,Integer payWay, boolean isRecharge);

    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> placeSearch(ReqSearchVo reqSearchVo);

    /**
     * 结合场景预测推荐场馆
     * @param userId
     * @param reqSearchVo
     * @return
     */
    APIResponse<?> recommendPlaceByUid(Integer userId, ReqSearchVo reqSearchVo);

    /**
     * 包含用户订场的搜索
     * @param reqSearchVo
     * @return
     */
    APIResponse<PageObj<List<RespBizPlaceBaseInfo>>> newPlaceSearch(ReqSearchVo reqSearchVo);
}
